package 基础题;

import java.util.Scanner;

/**
 *
 * @author : CHZERO
 * @date   : 2019-03-21 09:34:57
 * @email  : 827348260@qq.com
 * @description :  注意:  输入的数字过大时   sum = (1 + number) * number / 2;  可能发生int溢出 所有使用long
 * System.out.printf(); 使用%n 代替\n
 */
public class HDU1001 {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		long sum = 0;
		while (scanner.hasNextInt()) {
			long number = scanner.nextInt();
			sum = (1 + number) * number / 2; //(1 + number) * (number / 2)
			System.out.printf("%d%n%n", sum);
		}
	}

}
